<?php
defined('GMANAGER_LIBS') or die('You can not access the page.');

/**
 *  
 *  Cache_Lite-1.7.8
 *  
 */
include_once GMANAGER_LIBS.'/cache_lite/libs/Lite.php';

class Gmanager_Cache_Lite
{
    public function get( $appendConfig=NULL )
    {
        $config = self::getConfig();
        if( is_array($appendConfig) ) {
            $config = $appendConfig + $config;
        }

        $cacheLite = new Cache_Lite();
        $cacheLite->_cacheDir = $config['cacheDir'];
        $cacheLite->_caching  = $config['caching'];
        $cacheLite->_lifeTime = $config['lifeTime'];
        return $cacheLite;
    }

    public function getConfig()
    {
        return include GMANAGER_LIBS.'/cache_lite/config.inc.php';
    }

}
